<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="v000_openbusCommon.jsp" flush="false" />

<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="imagetoolbar" content="no"/>

<link rel="stylesheet" type="text/css" href="../static/css/openbus.css"></link>

<script type="text/javascript" src="../static/js/prototype_1.6.1.js"></script>
<script type="text/javascript" src="../static/js/xml2json.js"></script>
<script type="text/javascript" src="../static/js/openbusCommon.js"></script>
<script type="text/javascript" src="../static/js/openbus.js"></script>

<script type="text/javascript">

function getAjaxCallUrl() {
    return "/openbus/nearstation" ;
}

function getAjaxParams() {
    var debug = ${ param.debug == null ? '""' : param.debug } ;

    var params =  {
          "a"            : "" 
        , "key" : "${keyCommon}"
        , "x" : $( 'x' ).value
        , "y" : $( 'y' ).value
        , "radius" : $( 'radius' ).value
        , "debug"            : debug
    };
    
    return params ;    
}

function getEntryTag( entry ) {
    var tab = '&nbsp;';
    var dist = parseInt( '' + entry.dist );
    var x = "" + entry.x;
    if( x.length > 11 ) {
        x = x.substring( 0 ,10 );
    }
    var y = "" + entry.y;
    if( y.length > 11 ) {
        y = y.substring( 0, 10 );
    }
    var title = entry.no + tab + entry.name + tab + dist + 'm' + tab+ ' ' + x + ', ' + y ;
    return title;
} 

function preLoader() 
{
    var heavyImage = new Image( 100, 100 ); 
    heavyImage.src = "../static/image/ajax/loading.gif" ; 
}

</script>

<title> 인근 정류소 검색 </title>
</head>
<body onLoad="javascript:preLoader();">
<a href="demo.jsp">&lt;&lt;홈</a><br/>
경도(X): <input type="text" id="x" value="127.0299" maxlength="10" size="12"/>
위도(Y): <input type="text" id="y" value="37.26243" maxlength="10" size="12" />
<input type="button" value="인근 정류소 검색" onclick="javascript:showSearchResult();"/>
<img id="loadingLogoPane" style="visibility: hidden;"src="../static/image/ajax/loading.gif" />
<br/>
반경: <input type="text" id="radius" value="500" maxlength="4" size="5"/> m
<div id="gridUi" class="gridUi" style="width: 320px; border: 2px solid #7a991a ;">
    <br/>
</div>
</body>
</html>
